'''
Desc: 定义线程
Author: 陈爱国
Date: 2024-08-31 21:15:16
'''
from PyQt5.QtCore import QThread, pyqtSignal

class NewTaskThread(QThread):
    # 定义信号
    success = pyqtSignal(int, str, str, str)
    error = pyqtSignal(int, str, str, str)

    def __init__(self, row_index, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.row_index = row_index
        

    def run(self):
        """具体线程应该做的事情"""
        self.success.emit(self.row_index, "x", "xx", "xxx")